﻿
Public Class report_sopir

    Private Sub report_sopir_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'DS_t01_tugas.tugas' table. You can move, or remove it, as needed.
        'Dim myConnString As String
        'myConnString = "server=localhost;User Id=root;password=;Persist Security Info=True;database=db_petruk_new"
        'Dim ds As New DataSet
        'Dim dsconn As New MySqlConnection(myConnString)
        'Dim dsDa As New MySqlDataAdapter
        'Dim strsql As String = "SELECT tugas.TGL_AWAL,tugas.TGL_AKHIR,master_sopir.NAMA,master_truk.PLAT_NOMOR,master_titik.NAMA_TPS FROM tugas JOIN master_sopir ON master_sopir.ID_SOPIR=tugas.ID_SOPIR JOIN tugas_tps ON tugas_tps.ID_TUGAS=tugas.ID_TUGAS JOIN master_titik ON master_titik.ID_TITIK=tugas_tps.ID_TITIK JOIN master_truk ON master_truk.ID_TRUK = master_sopir.ID_TRUK WHERE TGL_AWAL >= '" & form_rekap_sopir.TGL_AWAL.Text & "' AND TGL_AKHIR <= '" & form_rekap_sopir.TGL_AKHIR.Text & "' AND tugas.ID_SOPIR = " & form_rekap_sopir.ID_SOPIR.Text & ""
        'Try
        '    dsconn.Open()
        '    dsDa.SelectCommand = New MySqlCommand(strsql, dsconn)
        '    dsDa.Fill(ds)
        '    ds.WriteXml(CurDir() & "/rekap_sopir.xml", XmlWriteMode.WriteSchema)
        'Catch ex As Exception
        '    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        'End Try
    End Sub
End Class